package com.abc.controller;

import com.abc.entity.Kecheng;
import com.abc.service.KechengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class KechengController {
    @Autowired
    private KechengService kechengService;
    @RequestMapping(value = "/addKecheng")
    @ResponseBody
    public String addKecheng(Kecheng kecheng){
        return kechengService.addKecheng(kecheng);
    }
    @RequestMapping(value = "/findAllKecheng")
    @ResponseBody
    public List<Kecheng> findAllKecheng(){
        return kechengService.findAllKecheng();
    }



}
